﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterPage/Site.master" AutoEventWireup="true" Inherits="Bebida" Codebehind="Bebida.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
  <script src="Scripts/miScript.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<h2>
    Bebidas
</h2>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConflictDetection="CompareAllValues" 
            ConnectionString="<%$ ConnectionStrings:BarCafeConnectionString %>" 
            DeleteCommand="DELETE FROM [Bebida] WHERE [Id_Bebida] = @original_Id_Bebida AND (([Descripcion] = @original_Descripcion) OR ([Descripcion] IS NULL AND @original_Descripcion IS NULL)) AND (([Tamanio] = @original_Tamanio) OR ([Tamanio] IS NULL AND @original_Tamanio IS NULL)) AND [Valor] = @original_Valor" 
            InsertCommand="INSERT INTO [Bebida] ([Descripcion], [Tamanio], [Valor]) VALUES (@Descripcion, @Tamanio, @Valor)" 
            OldValuesParameterFormatString="original_{0}" 
            SelectCommand="SELECT [Id_Bebida], [Descripcion], [Tamanio], [Valor] FROM [Bebida]" 
            UpdateCommand="UPDATE [Bebida] SET [Descripcion] = @Descripcion, [Tamanio] = @Tamanio, [Valor] = @Valor WHERE [Id_Bebida] = @original_Id_Bebida AND (([Descripcion] = @original_Descripcion) OR ([Descripcion] IS NULL AND @original_Descripcion IS NULL)) AND (([Tamanio] = @original_Tamanio) OR ([Tamanio] IS NULL AND @original_Tamanio IS NULL)) AND [Valor] = @original_Valor">
            <DeleteParameters>
                <asp:Parameter Name="original_Id_Bebida" Type="Int32" />
                <asp:Parameter Name="original_Descripcion" Type="String" />
                <asp:Parameter Name="original_Tamanio" Type="String" />
                <asp:Parameter Name="original_Valor" Type="Int64" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="Descripcion" Type="String" />
                <asp:Parameter Name="Tamanio" Type="String" />
                <asp:Parameter Name="Valor" Type="Int64" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="Descripcion" Type="String" />
                <asp:Parameter Name="Tamanio" Type="String" />
                <asp:Parameter Name="Valor" Type="Int64" />
                <asp:Parameter Name="original_Id_Bebida" Type="Int32" />
                <asp:Parameter Name="original_Descripcion" Type="String" />
                <asp:Parameter Name="original_Tamanio" Type="String" />
                <asp:Parameter Name="original_Valor" Type="Int64" />
            </UpdateParameters>
        </asp:SqlDataSource>
</p>
    <p>
        <asp:FormView ID="FormView1" runat="server" AllowPaging="True" CellPadding="4" 
            DataKeyNames="Id_Bebida" DataSourceID="SqlDataSource1" ForeColor="#333333" 
            Width="924px">
            <EditItemTemplate>
                Id_Bebida:
                <asp:Label ID="Id_BebidaLabel1" runat="server" 
                    Text='<%# Eval("Id_Bebida") %>' />
                <br />
                Descripcion:
                <asp:TextBox ID="DescripcionTextBox" runat="server" 
                    Text='<%# Bind("Descripcion") %>' onkeypress="return  isLetter()"  MaxLength="50"/>
                <br />
                Tamanio:
                <asp:TextBox ID="TamanioTextBox" runat="server" Text='<%# Bind("Tamanio") %>'
                 MaxLength="5" onkeypress="return  isNumber()" autocomplete="off"/>
                <asp:RequiredFieldValidator ID="rfvTamanioTextBox2" runat="server" ErrorMessage="*"
                ControlToValidate="TamanioTextBox" EnableClientScript="True" />
                <br />
                Valor:
                <asp:TextBox ID="ValorTextBox" runat="server" Text='<%# Bind("Valor") %>' 
                MaxLength="5" onkeypress="return  isNumber()" autocomplete="off"/>
                 <asp:RequiredFieldValidator ID="rfValorTextBox2" runat="server" ErrorMessage="*"
                ControlToValidate="ValorTextBox" EnableClientScript="True" />
                <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                    CommandName="Update" Text="Actualizar" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancelar" />
            </EditItemTemplate>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <InsertItemTemplate>
                Descripcion:
                <asp:TextBox ID="DescripcionTextBox" runat="server" 
                    Text='<%# Bind("Descripcion") %> ' onkeypress="return  isLetter()"  MaxLength="50" />
                <br />
                Tamanio:
                <asp:TextBox ID="TamanioTextBox" runat="server" Text='<%# Bind("Tamanio") %>' 
                MaxLength="5" onkeypress="return  isNumber()" autocomplete="off"/>
                <asp:RequiredFieldValidator ID="rfvTamanioTextBox" runat="server" ErrorMessage="*"
                ControlToValidate="TamanioTextBox" EnableClientScript="True" />
                <br />
                Valor:
                <asp:TextBox ID="ValorTextBox" runat="server" Text='<%# Bind("Valor") %>'
                 MaxLength="5" onkeypress="return  isNumber()" autocomplete="off"/>
                <asp:RequiredFieldValidator ID="rfValorTextBox" runat="server" ErrorMessage="*"
                ControlToValidate="ValorTextBox" EnableClientScript="True" />
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="Insertar" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancelar" />
            </InsertItemTemplate>
            <ItemTemplate>
                Id_Bebida:
                <asp:Label ID="Id_BebidaLabel" runat="server" Text='<%# Eval("Id_Bebida") %>' />
                <br />
                Descripcion:
                <asp:Label ID="DescripcionLabel" runat="server" onkeypress="return  isLetter()"  MaxLength="50"
                    Text='<%# Bind("Descripcion") %>' />
                <br />
                Tamanio:
                <asp:Label ID="TamanioLabel" runat="server" Text='<%# Bind("Tamanio") %>' MaxLength="5" onkeypress="return  isNumber()"/>
                <br />
                Valor:
                <asp:Label ID="ValorLabel" runat="server" Text='<%# Bind("Valor") %>' MaxLength="5" onkeypress="return  isNumber()"/>
                <br />
                <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                    CommandName="Edit" Text="Editar" />
                &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                    CommandName="Delete" Text="Eliminar" />
                &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                    CommandName="New" Text="Nuevo" />
            </ItemTemplate>
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />

            <emptydatatemplate>

  
           No se encontraron datos.  
            <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                    CommandName="New" Text="Nuevo" />
        </emptydatatemplate> 
        </asp:FormView>
</p>


</asp:Content>


